//
//  Ausruestung.cs
//
//  Author:
//       Philipp Schröck <philsch@hotmail.de>
//
//  Copyright (c) 2013 Philipp Schröck
//
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU Lesser General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU Lesser General Public License for more details.
//
//  You should have received a copy of the GNU Lesser General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
using System;

namespace libcharakter.ausrüstung
{
    public enum AusruestungType
    {
        Nahrung,
        NahkampfWaffe,
        FernkampWaffe,
        Ruestung,
        Wertlos,
        Kleidung,
        Schmuck,

        MAX,
    }
    [Serializable]
    public abstract class Ausruestung
    {
        private decimal m_gewicht;
        private int m_preis;
        private string m_name;
        private AusruestungType m_type;

        protected Charakter m_char;
        protected int m_stapel;

        public decimal Gewicht { get { return m_gewicht; } protected set { m_gewicht = value; } }
        public decimal GasamtGewicht { get { return m_gewicht*m_stapel; } }

        public int Preis { get { return m_preis; } }
        public string Name { get { return m_name; } }
        public AusruestungType Type { get { return m_type; } }
        public int Stapel { get { return m_stapel; } protected set { m_stapel = value; } }


        public Charakter Charakter { get { return m_char; } }

        public Ausruestung() 
            : this("Staub", 0, 0, AusruestungType.Wertlos, 1)
        {
        }
        public Ausruestung(string name, decimal gewicht, int preis, AusruestungType type, int anzahl)
        {
            m_name = name;
            m_gewicht = gewicht;
            m_preis = preis;
            m_type = type;
            m_stapel = anzahl;

        }
        public abstract bool Equip(Charakter chr);
    }
}

